package com.zijidelu.luframework.plugins.tomlock.redisson;

import com.zijidelu.luframework.plugins.tomlock.core.TomLockExecutor;
import com.zijidelu.luframework.plugins.tomlock.core.data.BaseTomLockData;
import com.zijidelu.luframework.plugins.tomlock.core.data.TomLockResult;
import org.redisson.api.RLock;

import java.util.function.Supplier;

/**
 * @author ZIJIDELU
 * @datetime 2025/4/20 12:38
 */
public interface RedissonLockExecutor extends TomLockExecutor {

    RLock calcLock(BaseTomLockData tomLockData, TomLockResult tomLockResult);

    <T> T run(BaseTomLockData tomLockData, RLock rLock, Supplier<T> supplier);
}
